package com.hertz.iris.view.matchalarm;

import java.util.List;

import android.view.LayoutInflater;

import com.github.kevinsawicki.wishlist.SingleTypeAdapter;
import com.hertz.iris.R;
import com.hertz.iris.pojo.Ring;

public class RingListAdapter extends SingleTypeAdapter<Ring> {

	/**
     * @param inflater
     * @param items
     * @param selectable
     */
    public RingListAdapter(LayoutInflater inflater, List<Ring> items) {
        super(inflater, R.layout.ring_selector_item);
        setItems(items);
    }

    /**
     * @param inflater
     * @param items
     */
    public RingListAdapter(LayoutInflater inflater) {
        this(inflater, null);
    }

    @Override
    protected int[] getChildViewIds() {
        return new int[] { android.R.id.text1 };
    }

    @Override
    protected void update(int position, Ring item) {
        setText(0, item.getName());
    }
}
